#include <queue>
#include <map>
#include <vector>
#include <iostream>
#include <cstdio>
int abs(int n) {
 	return (n >= 0 ? n : -n);
}

enum direction {up, down, left, right};

direction next(direction d) {
	direction d1;
	switch(d) {
	case up: d1 = down; break;
	case down: d1 = left; break;
	case left: d1 = right; break;
	case right: d1 = up; break;
	}
	return d1;
}

int linear_imperfection(int sequence) {
    switch (sequence) {
            case 0: case 1: case 2: case 3: case 4:
            case 12: case 13: case 14: case 23: case 24: case 34:
            case 123: case 124: case 134: case 234:
            case 1234:
                return 0;
            /*case 21: case 31: case 41: case 32: case 42: case 43:
            case 132: case 213: case 231: case 312:
            case 142: case 214: case 241: case 412:
            case 143: case 314: case 341: case 413:
            case 243: case 324: case 342: case 423:
            case 1243: case 1324: case 1342: case 1423:
            case 2134: case 2314: case 2341: case 3124: case 4123:
                return 2;
            */
            case 321: case 432: case 421: case 431:
            case 1432: case 2143: case 2413: case 2431:
            case 3142: case 3214: case 3241: case 3412: case 3421:
            case 4132: case 4213: case 4231: case 4312:
                return 4;
            case 4321:
                return 6;
            default:
                return 2;
    }

}

class fifteen {
private:
	std::vector<char> cell;
	int freeCell;
public:
	fifteen() {
	    cell.resize(16);
		for (int i=0; i<15; i++) cell[i] = i+1;
		cell[15] = 0;
		freeCell = 15;
	}

	fifteen(const std::vector<int>& array) {
		cell.resize(16);
		for (int i=0; i<16; i++) {
			cell[i] = array[i];
			if (!cell[i]) {
				freeCell = i;
			}
		}
	}


	int imperfection() const {
		int imp = 0;

		//Manhattan distance
		for (int i = 0; i < 16; i++) {
			if (cell[i]) {
				imp += abs(i / 4 - (cell[i] - 1) / 4) + abs(i % 4 - (cell[i] - 1) % 4);
			} else {
				imp += abs(i / 4 - 3) + abs(i % 4 - 3);
			}
		}

		//linear conflicts
		for (int i = 0; i < 4; i++) {
            int degree = 0;
            int sequence = 0;
            for (int j = 3; j >= 0; j--) {
                if (cell[i*4+j] && (cell[i*4+j] - 1) / 4 == (i*4+j) / 4) {
                    int figure = (cell[i*4+j] - 1) % 4 + 1;
                    for (int c = 0; c < degree; c++)
                        figure *= 10;
                    sequence += figure;
                    degree++;
                }
            }

            imp += linear_imperfection(sequence);

        }

		return imp;
	}

	bool operator < (const fifteen& operand) const {
		int imp1 = imperfection();
		int imp2 = operand.imperfection();
		if (imp1 != imp2) {
            return imperfection() > operand.imperfection();
		}
		else {
            return cell > operand.cell;
		}
	}

	bool canMove(direction d) const {
		if (d == up) return (freeCell < 12);
		else if (d == down) return (freeCell > 3);
		else if (d == left) return (freeCell % 4 != 3);
		else return (freeCell % 4);
	}

	fifteen moved(direction d) const {
		fifteen moved = *this;
		if (d == up) {
			moved.cell[freeCell] = cell[freeCell+4];
			moved.cell[freeCell+4] = 0;
			moved.freeCell += 4;

		} else if (d == down) {
			moved.cell[freeCell] = cell[freeCell-4];
			moved.cell[freeCell-4] = 0;
			moved.freeCell -= 4;

		} else if (d == left) {
			moved.cell[freeCell] = cell[freeCell+1];
			moved.cell[freeCell+1] = 0;
			moved.freeCell += 1;

		} else {
			moved.cell[freeCell] = cell[freeCell-1];
			moved.cell[freeCell-1] = 0;
			moved.freeCell -= 1;

		}

		return moved;
	}

    void move(direction d) {
        *this = moved(d);
    }

};



int main() {

std::vector<int> begin_position;
for (int i=0; i<16; i++) {
	int k;
	std::cin >> k;
	begin_position.push_back(k);
}

int inversions = 0;
for (int i = 0; i < 15; i++)
    for (int j = i+1; j < 16; j++)
        if (begin_position[i] > begin_position[j])
            inversions++;
if (inversions % 2 == 0) {
    std::cout << "The decision doesn't exist!";
    return 0;
}


fifteen current(begin_position);
std::priority_queue<fifteen> positions;
std::map<fifteen,char> used;
positions.push(current);
used.insert(std::make_pair(current, 0));

    //std::cout << current.imperfection();
    //return 0;



int count = 0;
while (current.imperfection()) {

	positions.pop();

	direction d = up;
	for (int i=0; i<4; i++) {
		if (current.canMove(d)) {
			fifteen newpos = current.moved(d);
			if (used.find(newpos) == used.end()) {
				positions.push(newpos);
				used.insert(std::make_pair(newpos,
									  d == up ? 'U' :
									  d == down ? 'D' :
                                        d == left ? 'L' : 'R'));
			}
		}
		d = next(d);
	}

    current = positions.top();

    count++;
    //if (count % 1000 == 0) {
    //    std::cout << positions.size() << ' '<< used.size()<<'\n';
    //}
}

char step;
std::vector<char> answer;

while (step = used[current]) {
	answer.push_back(step);
    if (step == 'D') current.move(up);
    else if (step == 'U') current.move(down);
    else if (step == 'R') current.move(left);
    else current.move(right);
}

std::cout << "The decision is found! " << answer.size() << " moves:\n";

for (int i = answer.size()-1; i >= 0; i--)
	std::cout << answer[i];

std::cout << '\n';

return 0;

}
